home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ddx-mips.zip / MIPSIO.H < prev    next >
C/C++ Source or Header  |  1992-07-31  |  2KB  |  67 lines

  1. /*
  2.  * $XConsortium$
  3.  *
  4.  * Copyright 1991 MIPS Computer Systems, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of MIPS not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  MIPS makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * MIPS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MIPS
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23. /* $Header: mipsIo.h,v 1.5 91/07/15 19:47:45 dd Exp $ */
  24. #ifndef __DDX_MIPSIO_H
  25. #define    __DDX_MIPSIO_H
  26.  
  27. #define MAXEVENTS       100
  28.  
  29. /* Device capabilities */
  30.  
  31. #define    DEV_TIMESTAMP    0x01    /* Timestamps enabled */
  32. #define DEV_BUZZER    0x02    /* Buzzer enabled */
  33. #define DEV_COLORMAP    0x04    /* Colormap enabled */
  34. #define DEV_LIGHTS    0x08    /* lights enabled */
  35. #define DEV_ASYNC    0x10    /* async io enabled */
  36. #define DEV_READ    0x20    /* readable */
  37. #define DEV_INIT    0x40    /* initable */
  38. #define DEV_BLANK    0x80    /* Blanking enabled */
  39.  
  40. extern int        isItTimeToYield;
  41. extern int        lastEventTime;
  42. extern ScreenInfo    screenInfo;
  43.  
  44. #ifdef X11R4
  45. extern int        screenIsSaved;
  46. extern void        SaveScreens();
  47. #endif /* X11R4 */
  48.  
  49. /* keyboard/mouse signal macros */
  50. #include <sysv/sys/signal.h>        /* included here to avoid mistakes */
  51. #ifdef SYSV
  52. #define    SIGCATCH(f)    ((void) sigset(SIGPOLL,(f)))
  53. #define    SIGIGNORE    ((void) sigignore(SIGPOLL))
  54. #define    SIGHOLD_DCL
  55. #define    SIGHOLD        ((void) sighold(SIGPOLL))
  56. #define    SIGRELEASE    ((void) sigrelse(SIGPOLL))
  57. #else /* SYSV */
  58. #define    SIGCATCH(f)    ((void) signal(SIGPOLL,(f)))
  59. #define    SIGIGNORE    ((void) signal(SIGPOLL, SIG_IGN))
  60. #define    SIGHOLD_DCL    int __sigmask;
  61. #define    SIGHOLD        ((__sigmask = sigblock(sigmask(SIGPOLL))))
  62. #define    SIGRELEASE    ((void) sigsetmask(__sigmask))
  63. #endif /* SYSV */
  64.  
  65.  
  66. #endif /* __DDX_MIPSIO_H */
  67.